<?php 
	$row_index = $this->row_index;
	echo '<div class="table-list">';
	//table head - general information
	$html = '';
	$html .= '<div class="table-head">';
	$html .= '<span class="left count-row">#</span>';		
	$html .= '<span class="left">Dominator</span>';
	$html .= '<span class="left">Race</span>';
	$html .= '<span class="left">Hero Level</span>';
	$html .= '<span class="left">Power</span>';
	$html .= '<span class="nob">Army Size</span>';	
	$html .= '</div>';
	echo $html;
	//end table head

foreach ($this->paginator as $rankingPage) {
	$row_index ++;
	// create row for every player
	$html = '';
	$urlArray = array('controller' =>'attack', 'action'=>'player');
	if( $this->userId != $rankingPage['user_fk'] )
	{
		$html .= '<a href="'.$this->url($urlArray, null, true).'?p='.$rankingPage['user_fk'].'" class="">';
	}	
	$html .= '<div class="'. ( ($row_index % 2) ? 'odd' : 'even' ) .'">';
	$html .= '<span class="left count-row">'.$row_index.'</span>';
	/*if( $this->userId != $rankingPage['user_fk'] ) 	{
		$html .= '<span class="left">' .'<a href="'.$this->url($urlArray, null, true).'?p='.$rankingPage['user_fk'].'" class="">'. $rankingPage['alias'] . '</a>' . '</span>'; 
	}
	else { 
	    $html .= '<span class="left">'. $rankingPage['alias'] .'</span>'; 
	}*/

	$html .= '<span class="left">'. $rankingPage['alias'] .'</span>'; 
	$html .= '<span class="left">'. $rankingPage['race_name'] .'</span>';
	$html .= '<span class="left">'. $rankingPage['hero_level'] .'</span>';
	$html .= '<span class="left">'. round($rankingPage['power']) .'</span>';
	$html .= '<span class="nob">'. $rankingPage['total_population'] .'</span>';	
	$html .= '</div>';

	if( $this->userId != $rankingPage['user_fk'] )
	{
		$html .= '</a>';
	}
	echo $html;
 }
  	echo '</div>';
	echo '<div class="pagination">';
  	echo $this->gotoPage;
  	echo $this->paginationControl($this->paginator,'sliding', 'pagination.phtml');  	
    echo '</div>';
?>